package com.flashextended.apps.logomaker.beans.workareaobjects
{
	import mx.core.UIComponent;
	import mx.events.ResizeEvent;
	
	public class GenericObject extends UIComponent
	{
		public static var __idObject:int = 0;
		public function GenericObject()
		{
			this.addEventListener(ResizeEvent.RESIZE, resizeContainer);
			idObject = __idObject;
		}
		
		private var _idObject:int;
		public function set idObject(val:int):void
		{
			_idObject = val;
			__idObject++;
		}
		public function get idObject():int
		{
			return _idObject;
		}
		
		/**
		 * Could be : "IMAGE", "SYMBOL", "TEXT"
		 */ 
		private var _type:String;
		public function set type(val:String):void
		{
			_type = val;
		}
		public function get type():String
		{
			return _type;
		}				
		
		private var _objectWidth:Number;
		public function set objectWidth(val:Number):void
		{
			_objectWidth = val;
			changeW();
		}
		public function get objectWidth():Number
		{
			return _objectWidth;
		}
		
		private var _objectHeight:Number;
		public function set objectHeight(val:Number):void
		{
			_objectHeight = val;
			changeH();
		}
		public function get objectHeight():Number
		{
			return _objectHeight;
		}
		
		private var _objectX:Number;
		public function set objectX(val:Number):void
		{
			_objectX = val;
			moveX();
		}
		public function get objectX():Number
		{
			return _objectX;
		}
		
		private var _objectY:Number;
		public function set objectY(val:Number):void
		{
			_objectY = val;
			moveY();
		}
		public function get objectY():Number
		{
			return _objectY;
		}
		
		private var _objectRotation:Number;
		public function set objectRotation(val:Number):void
		{
			_objectRotation = val;
			changeRotation();
		}
		public function get objectRotation():Number
		{
			return _objectRotation;
		}		
		
		
		protected function moveX():void{};
		protected function moveY():void{};
		protected function changeW():void{};
		protected function changeH():void{};
		protected function changeRotation():void{};
		protected function resizeContainer(e:ResizeEvent):void{};				

	}
}